package dongshi.daddy.config.rpc;

import dongshi.daddy.beans.config.ShoppingCart;
import dongshi.daddy.beans.config.SimulationOrder;
import dongshi.daddy.beans.config.SimulationResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

//@FeignClient(value = "coupon-calculation-serv", path = "/calculator")
@FeignClient(value = "coupon-calculation-serv-config", path = "/calculator")
public interface CalculationService {

    // 订单结算
    @PostMapping("/checkout")
    ShoppingCart checkout(ShoppingCart settlement);

    // 优惠券试算
    @PostMapping("/simulate")
    SimulationResponse simulate(SimulationOrder simulator);
}